<template>
  <div
    class="map"
    ref="viewerDivRef"
    style="width: 100vw; min-height: 100vh; position: relative"
  ></div>
</template>

<script setup lang="ts">
import { onMounted, ref } from "vue";
import Controller from "./src/Controller";
import mapJson from "@/components/AplidCharts/data/config";
const viewerDivRef = ref<HTMLDivElement>();

let map: any = new Controller();

onMounted(() => {
  map.createViewer(viewerDivRef.value);
  map.AddWaterLayer(mapJson["nanjing"]);
  // map.addZheZhao(mapJson["nanjing"]);
});

defineExpose({
  map,
});
</script>

<style scoped lang="scss"></style>
